//
//  XiangqingTableViewCell.m
//  B段项目
//
//  Created by 徐茂怀 on 15/11/4.
//  Copyright © 2015年 徐茂怀. All rights reserved.
//

#import "XiangqingTableViewCell.h"
#import "FitHeader.h"
@implementation XiangqingTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

-(void)createView
{
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    _nameLabel = [[UILabel alloc]init];
    _nameLabel.font = [UIFont fontWithName:@"EuphemiaUCAS-Bold" size:19 * FitWidth];
    _weightLabel = [[UILabel alloc]init];
    _weightLabel.font = [UIFont fontWithName:@"EuphemiaUCAS-Bold" size:19 * FitWidth];
    _weightLabel.textColor = [UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:1];
    _haveButton = [UIButton buttonWithType:UIButtonTypeSystem];
    _haveButton.tintColor = [UIColor colorWithRed:0.12 green:0.63 blue:0.59 alpha:1];

    
    [self.contentView addSubview:_nameLabel];
    [self.contentView addSubview:_weightLabel];
    [self.contentView addSubview:_haveButton];
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    _nameLabel.frame = CGRectMake(20 * FitWidth, 5 * FitHeight, 100 * FitWidth, 30 * FitHeight);
    _weightLabel.frame = CGRectMake(200 * FitWidth, 5 * FitHeight, 150 * FitWidth, 30 * FitHeight);
    _haveButton.frame = CGRectMake(_nameLabel.frame.origin.x + _nameLabel.frame.size.width + 5 * FitWidth, 8 * FitHeight, 16 * FitWidth, 16 * FitHeight);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
